var a = getApp();

Page({
    data: {
        page: 1
    },
    onLoad: function(a) {
        this.getdata();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        this.data.current_page >= this.data.last_page || this.getMore();
    },
    onShareAppMessage: function() {},
    getdata: function() {
        var t = this, o = a.getNetAddresss("plugin.cloud-warehouse.frontend.warehouse-goods-manage.unblock-log");
        a._getNetWork({
            url: o,
            success: function(a) {
                var o = a.data;
                1 == o.result ? (console.log(o), t.setData({
                    info: o.data.data,
                    current_page: o.data.current_page,
                    last_page: o.data.last_page
                })) : wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    },
    getMore: function() {
        var t = this.data.page + 1, o = this, e = a.getNetAddresss("plugin.cloud-warehouse.frontend.warehouse-goods-manage.unblock-log");
        a._getNetWork({
            url: e,
            data: {
                page: t
            },
            success: function(a) {
                var t = a.data;
                1 == t.result ? (console.log(t), o.setData({
                    info: t.data.data,
                    current_page: t.data.current_page,
                    last_page: t.data.last_page
                })) : wx.showToast({
                    icon: "none",
                    title: t.msg,
                    duration: 1500
                });
            },
            fail: function(a) {
                console.log(a);
            }
        });
    }
});